<template>
	<view style="position: fixed;bottom: 230rpx;left: 0;width: 100%;height: 100rpx;display: flex;" v-if="!this.userInfo?.subscribeMp && show && type === '1'">
		<view style="display: flex;align-items: center; flex: 1;margin: 0 26rpx;height: 100%;background-color: #fff;border-radius: 30rpx;	box-shadow: 0rpx 0rpx 6rpx 3rpx rgba(0,0,0,0.02);">
			<view style="font-size: 24rpx;flex: 1;padding: 0 20rpx;">关注清醺局，活动动态实时掌握</view>
			<u-button @click="handleToAtten" customStyle="width: 150rpx;height: 60rpx;border-radius: 44rpx;background-color: #ffb803;border: none;font-size: 24rpx;" color="#333" >
				<text style="font-size: 24rpx;">去关注</text>
			</u-button>
			&nbsp;&nbsp;
			<u-icon @click="handleClose" name="close" size="24" color="#aaa" style="margin: 0 30rpx;"></u-icon>&nbsp;&nbsp;
		</view>
	</view>
	<view style="width: 100%;height: 100rpx;display: flex;" v-if="!this.userInfo?.subscribeMp && show && type === '2'">
		<view style="display: flex;align-items: center; flex: 1;margin: 0 0;height: 100%;background-color: #fff;border-radius: 30rpx;	box-shadow: 0rpx 0rpx 6rpx 3rpx rgba(0,0,0,0.02);">
			<view style="font-size: 24rpx;flex: 1;padding: 0 20rpx;">关注清醺局，活动动态实时掌握</view>
			<u-button @click="handleToAtten" customStyle="width: 150rpx;height: 60rpx;border-radius: 44rpx;background-color: #ffb803;border: none;font-size: 24rpx;" color="#333" >
				<text style="font-size: 24rpx;">去关注</text>
			</u-button>
			&nbsp;&nbsp;
			<u-icon @click="handleClose" name="close" size="24" color="#aaa" style="margin: 0 30rpx;"></u-icon>&nbsp;&nbsp;
		</view>
	</view>
</template>

<script>
	import { getUserInfoDetail } from '../../../config/utils.js';
	export default {
		data() {
			return {
				userInfo: '',
				show: true
			}
		},
		props: {
			type: {
				type: String,
				default: '1'
			}
		},
		onReady() {
			let userInfo = getUserInfoDetail();
			this.userInfo = userInfo;
		},
		methods: {
			handleClose() {
				this.show = false;
			},
			handleToAtten() {
				uni.navigateTo({
					url: `/pages/webview/webview?url=` + encodeURIComponent('https://mp.weixin.qq.com/s/kYUFYEKM1hsVZgsPasp9lw')
				})
			},
		}
	}
</script>

<style>

</style>
